<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>

<body>
    <ol>
        <li>青花瓷</li>
        <li class="item">双截棍</li>
        <li>轨迹</li>
        <li>东风破</li>
        <li>发如雪</li>
    </ol>
    <script>
        // 需求：点击当前的li，打印索引号
        $('li').click(function () {
            // console.log(this);
            let index = $(this).index();
            console.log(index);
        });
    </script>
</body>

</html>